#include <UIMPackSim.h>
#include <gui\graphicsview\qgraphicsscene.h>
#include <gui\graphicsview\qgraphicsview.h>
#include <opengl\qgl.h>

namespace PackSim
{

	UIMPackSim::UIMPackSim(QWidget *parent , Qt::WFlags flags)
		: QMainWindow(parent, flags)
	{
		ui.setupUi(this);

		ui.graphicsView->setViewport(new QGLWidget());

		QObject::connect(ui.pBStart,		SIGNAL(clicked()), this, SIGNAL(PickGuiOnStartClicked()));
		QObject::connect(ui.pBStop,			SIGNAL(clicked()), this, SIGNAL(PickGuiOnStopClicked()));
		QObject::connect(ui.pBStartCnv,		SIGNAL(clicked()), this, SIGNAL(PickGuiOnStartCnvClicked()));
		QObject::connect(ui.pBStopCnv,		SIGNAL(clicked()), this, SIGNAL(PickGuiOnStopCnvClicked()));
		QObject::connect(ui.pBStartCreator, SIGNAL(clicked()), this, SIGNAL(PickGuiOnStartCRTClicked()));
		QObject::connect(ui.pBStopCreator,	SIGNAL(clicked()), this, SIGNAL(PickGuiOnStopCRTClicked()));

	}


	UIMPackSim::~UIMPackSim()
	{

	}

	void UIMPackSim::onStartClicked()
	{
		//emit PickGuiOnStartClicked();
	}

	void UIMPackSim::setScene( QGraphicsScene* scene )
	{	
		ui.graphicsView->setScene(scene);
	}




}


